package com.tianji.promotion.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.api.dto.promotion.CheckIssueStartMsgDTO;
import com.tianji.common.domain.dto.PageDTO;
import com.tianji.promotion.dto.CouponFormDTO;
import com.tianji.promotion.dto.CouponIssueFormDTO;
import com.tianji.promotion.dto.CouponQuery;
import com.tianji.promotion.entity.Coupon;
import com.tianji.promotion.vo.CouponDetailVO;
import com.tianji.promotion.vo.CouponPageVO;
import com.tianji.promotion.vo.CouponVO;

import java.util.List;

/**
 * <p>
 * 优惠券的规则信息 服务类
 * </p>
 *
 * @author xjs
 */
public interface ICouponService extends IService<Coupon> {

    void addCoupon(CouponFormDTO dto);

    PageDTO<CouponPageVO> pageQueryCoupon(CouponQuery query);

    void issue(Long id, CouponIssueFormDTO dto);

    void updateCoupon(Long id, CouponFormDTO dto);

    void deleteCoupon(Long id);

    CouponDetailVO getCoupon(Long id);

    void pause(Long id);

    void startIssue(CheckIssueStartMsgDTO dto);

    List<CouponVO> listIssueing();

    int incrementIssueNum(Long id, Integer issueNum);

    List<Coupon> getAvailableByUserId(Long userId);
}
